package com.first.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
@Slf4j
@Component
@RabbitListener(queues = "test")
public class TestReceiver {

    //表示处理接收的消息
    @RabbitHandler
    public void process(String msg){
        log.info("接收到的测试消息是：{}",msg);
    }
}
